import request from "@/utils/request";

export const listPublicPost = (pageSize) => request.get('/api/merchantPost/listPublicPost', { params: { pageSize } });

export const listFavoritePostByUserId = (query) => request.get('/api/merchantPost/listFavoritePostByUserId', {params: query });
// 新加贴文
export const insertANewPost = (merchantPost) => request.post('/api/merchantPost/insertANewPost', merchantPost);



// 通过店铺id分页查询贴文
export const listPagingPostsByStoreIdWithStoreName = (query) => request.get('/api/merchantPost/listPagingPostsByStoreIdWithStoreName', { params: query });

//根据id删除贴文
export const deletePostById = (id) => request.get('/api/merchantPost/deletePostById', { params: { id } });

// 根据id更新贴文
export const updatePost = (updatedPost) => request.post('/api/merchantPost/updatePost', updatedPost);